define('qq/1.0.0/jquery.qq', ['$'], function (require) {
	var jQuery = require('$');
	(function ($) {

		// plugin definition
		$.fn.qq = function (options) {
			var defaults = {
				qq : '732375676',
				qqDesc : '柠檬工作室'
			};
			// Extend our default options with those provided.
			var opts = $.extend(defaults, options);
			// Our plugin implementation code goes here.

			var arrQQ = opts.qq.split(',');
			var strQQ = arrQQ.join(':');
			var arrDesc = opts.qqDesc.split(',');
			var qqUrl = 'http://webpresence.qq.com/getonline?Type=1&' + strQQ + ':';
			var $this = $(this);
			$.getScript(qqUrl, function (data) {
				eval(data);
				var _html = '<div class="kefu-close"></div><div class="kefu-open"><div><ul>';
				for (var i = 0; i < arrQQ.length; i++) {
					_html += '<li><a href="http://wpa.qq.com/msgrd?v=3&uin=' + arrQQ[i] + '&site=qq&menu=yes" target="_blank"><i class="qq' + (online[i] ? online : '') + '"></i>' + arrDesc[i] + '</a></li>';
				}
				_html += '</ul></div><a href="javascript:;" class="close">关闭</a></div></div>';
				$this.append(_html);
				var _open = $this.find(".kefu-open"),
					_close = $this.find(".kefu-close");
				_open.find("a").hover(function () {
					$(this).stop(true, true).animate({paddingLeft : 20}, 200).find("i").stop(true, true).animate({left : 75}, 200);
				}, function () {
					$(this).stop(true, true).animate({paddingLeft : 35}, 200).find("i").stop(true, true).animate({left : 10}, 200);
				});

				_open.find(".close").click(function () {
					_open.animate({width : 148}, 200, function () {
						_open.animate({width : 0}, 200, function () {
							_close.animate({width : 34}, 200);

						});
					});
				});
				_close.click(function () {
					_close.animate({width : 44}, 200, function () {
						_close.animate({width : 0}, 200, function () {
							_open.animate({width : 138}, 200);
						});
					});
				});

			});

		};

	})(jQuery)
});